package cl.leshowski.pruebas;
import java.awt.dnd.Autoscroll;

import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
import twitter4j.auth.Authorization;
import twitter4j.conf.ConfigurationBuilder;
import twitter4j.internal.http.HttpRequest;


public class Prueba2Twitter {

	public static void main(String args[]) throws Exception{
	   
		ConfigurationBuilder confbuilder  = new ConfigurationBuilder();

		confbuilder.setOAuthAccessToken("54386921-8KDacJl4UgClu8e0xQ6EYOsAQX4sZoRiKuJzcAtMb")
		.setOAuthAccessTokenSecret("Oilj3PwaeGauXZZ7yb90qmNZ0moPAY4Z7hKaoc7k")
		 .setOAuthConsumerKey("51Acw1hXxyn1FSJ6ZLpidQ")
		.setOAuthConsumerSecret("hfjDX9UikiMaDcKCHOfmttIVQNO6Sr56wyy9PWLo");

		Twitter twitter = new TwitterFactory(confbuilder.build()).getInstance(); 
		
	    Status status = twitter.updateStatus("Prueba 3 de agosto #twitter4j....");
	    System.out.println("Successfully updated the status to [" + status.getText() + "].");
	    System.exit(0);
	  }
	  /*private static AccessToken loadAccessToken(int useId){
	    String token = // load from a persistent store
	    String tokenSecret = // load from a persistent store
	    return new AccessToken(token, tokenSecret);
	  }*/
}
